# -*- coding: utf-8 -*-

from django.db import models
from core.models import CoreModel, table_prefix


class DictType(CoreModel):
    name = models.CharField(null=True, blank=True, max_length=100, verbose_name="名称")
    type = models.CharField(max_length=100, verbose_name="类型")

    class Meta:
        db_table = table_prefix + "system_dicttype"
        verbose_name = "字典类型"
        verbose_name_plural = verbose_name
        ordering = ("sort",)


class DictData(CoreModel):
    type = models.CharField(max_length=100, default="", verbose_name="类型")
    tagClass = models.CharField(
        null=True, blank=True, max_length=100, verbose_name="CSS"
    )
    default = models.BooleanField(
        null=True, blank=True, default=True, verbose_name="默认状态"
    )
    label = models.CharField(null=True, blank=True, max_length=100, verbose_name="描述")
    value = models.CharField(null=True, blank=True, max_length=100, verbose_name="值")
    isDefault = models.CharField(
        null=True, blank=True, max_length=100, verbose_name="是否默认"
    )
    tagType = models.CharField(
        null=True, blank=True, max_length=100, verbose_name="类列表"
    )

    class Meta:
        db_table = table_prefix + "system_dictdata"
        verbose_name = "字典数据"
        verbose_name_plural = verbose_name
        ordering = ("sort",)
